<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>元素转换</title>
    <style>
        /* dispiay:block 转为块元素代码 */
        a {
            width: 100px;
            height: 50px;
            background-color: pink;
            display: block;
            /* 试验取消链接下划线text-decoration: none; */
            text-decoration: none;

        }

        /* 小插曲 试验增加光标悬浮颜色与下划线 */
        /* a:hover {
     color: blue;
     text-decoration: underline;

 } */

        div {
            /* 转为行元素代码display: inline; */
            width: 300px;
            height: 150px;
            background-color: blue;
            display: inline;
        }

        span {
            /* 转为行内块代码display: inline-block; */
            width: 300px;
            height: 249px;
            background-color: yellowgreen;
            display: inline-block;
        }
    </style>
</head>

<body>
    <a href="#">这是金星老师</a>
    <div>这是块级元素</div>
    <span>这是行内块元素</span>
</body>

</html>